<?php

namespace app\api\validate;

use think\Validate;

class FriendGroupUserValidate extends Validate
{
    //定义验证规则
    protected $rule = [
        'id|id' => 'require',
        'touid|被分组用户id' => 'require',
        'friend_group_id|好友分组id' => 'require',
        'page|页码' => 'require',
        'limit|每页多少条' => 'require',
    ];

    //定义验证提示
    protected $message = [
        'id.require' => '缺少参数id',
        'touid.require' => '缺少参数 被分组用户id',
        'friend_group_id.require' => '缺少参数 好友分组id',
        'limit.require' => '缺少参数 条数 limit',
        'page.require' => '缺少参数 条数 page',
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add' => ['touid', 'friend_group_id'],
        'update' => ['id','touid', 'friend_group_id'],
        'del' => ['touid', 'friend_group_id'],
        'list' => ['id','page','limit'],
    ];


}
